<layout name="layout" />
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">

        <div class="modal-header">
            <h4 class="modal-title">添加课程</h4>
        </div>
        <div class="modal-body">
            <form action="__SELF__" id="addClassForm" class="form-horizontal" method="post" accept-charset="utf-8">			<input type="text" class="form-control" name="comid" style="display:none" value="819188">
                <input type="text" class="form-control" name="id" style="display:none" value="{:$data['id']}">

                <div class="form-group">
                    <label  class="col-lg-2 control-label">选择课程</label>
                    <div class="col-lg-6">
                        <?php buildSelect('course','course_id','id','course_name',$data['course_id']); ?>
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-lg-2 control-label">选择等级</label>
                    <div class="col-lg-6">
                        <select class="form-control input-sm" name="level_id">
                            <option></option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-lg-2 control-label">选择老师</label>
                    <div class="col-lg-6">
                        <?php buildSelect('teacher','teacher_id','id','teacher_name',$data['teacher_id']); ?>
                    </div>
                    <div class="col-lg-4">
                        是否代课
                        <select class="input-sm" name="is_daike">
                            <option value="0">否</option>
                            <option value="1">是</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-lg-2 control-label">选择教室</label>
                    <div class="col-lg-6">
                        <?php buildSelect('classroom','classroom_id','id','classroom_name',$data['classroom_id']); ?>
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-lg-2 control-label ">选择日期</label>
                    <div class="col-lg-6">
                        <input type="text" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="form-control input-sm " name="course_date" id="add_set_date" value="{:$data['course_date']}">
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-lg-2 control-label">选择时间</label>
                    <div class="col-lg-6">
                        <input type="text" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="form-control input-sm necessery" name="course_time" id="add_class_begin_time" value="{:$data['course_time']}">
                    </div>
                    <div class="col-lg-4 " style="text-align:left;padding-left:3px;">
                        <h6>课程开始时间，格式如"13:30"</h6>
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-lg-2 control-label">最大人数</label>
                    <div class="col-lg-6">
                        <input type="text" class="form-control input-sm necessery" name="limit_num" id="max" placeholder="人数必填，请输入正整数" value="{:$data['limit_num']}">
                    </div>
                    <div class="col-lg-4 " style="text-align:left;padding-left:3px;">
                        <h6>将决定有多少席位能被预约</h6>
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-lg-2 control-label">次卡扣除</label>
                    <div class="col-lg-6">
                        <input type="text" class="form-control input-sm necessery" name="card_delete" id="defaultDelTimes" value="{:$data['card_delete']}">
                    </div>
                    <div class="col-lg-4" style="text-align:left;padding-left:3px;">
                        <h6>次，支持小数。</h6>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-2 control-label">课程颜色</label>
                    <div class="col-lg-6">
                        <input class="form-control input-sm" name="color" id="color" style="color: rgb(0, 0, 0);" value="{:$data['color']}">
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-lg-2 control-label">展示/预约</label>
                    <div class="col-lg-6">
                        <select class="form-control input-sm necessery" name="is_show" id="openToBook">
                            <option value="1">在微官网展示并接受预约</option>
                            <option value="2">在微官网展示，但不接受预约</option>
                            <option value="3">不在微官网展示</option>
                        </select>
                    </div>
                </div>

            </form></div>
        <div class="modal-footer">
            <button type="submit" id="add" class="btn btn-primary btn-sm">保存</button>
        </div>
<div class="panel panel-success">
    <div class="panel-heading">
        <h3 class="panel-title">预约记录</h3>
    </div>
    <div class="panel-body">
        <table class="table table-hover">
            <thead>
            <tr>
            <tr>
                <th style="border-top:0;">姓名</th>
                <th style="border-top:0;">手机</th>
                <th style="border-top:0;">卡号</th>
                <th style="border-top:0;">备注</th>
                <th style="border-top:0;">状态</th>
                <th style="border-top:0;">操作</th>
            </tr>
            </tr>
            </thead>
            <tbody>
            <foreach name="yuyueData" item="vo">
                <tr>
                    <td>{:$vo['yueyu_name']}</td>
                    <td>{:$vo['yueyu_tel']}</td>
                    <td>{:$vo['yueyu_kahao']}</td>
                    <td>{:$vo['yueyu_comment']}</td>
                    <td><php>
                        if($vo['status']==0){
                        echo  '预约';
                        }

                    </php>
                    </td>
                    <td style="width:140px">
                        <button name="cancel" class="btn btn-xs btn-success" buttonlist="6">取消</button>
                        <button name="add_checkin" class="btn btn-xs btn-success" buttonlist="4">上课</button>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
    </div>
</div>
<style>
    .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
    .ui-timepicker-div dl { text-align: left; }
    .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
    .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
    .ui-timepicker-div td { font-size: 90%; }
    .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
</style>


<script type="text/javascript" src="__PUBLIC__/Admin/css/layui.css"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/layui.js"></script>
<script type="text/javascript" src="__PUBLIC__/ColorPicker/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/ColorPicker/jquery.colorpicker.js"></script>


<script type="text/javascript">
    $(document).ready(function() {

        $("#color").colorpicker({

            fillcolor:true

        });

    });
    layui.use('laydate', function(){
        var laydate = layui.laydate;
    });
    $("#add").click(function () {
        document.getElementById("addClassForm").submit();
    });
</script>

